package org.nathanielyoung.fbb;

import org.directwebremoting.proxy.ScriptProxy;
import org.nathanielyoung.events.EventListener;

public class BoardChangeListener implements EventListener<BoardChangeEvent> {

	public void onEvent(BoardChangeEvent event) {
		Player player = event.getPlayer();
		
		ScriptProxy proxy = new ScriptProxy(player.getOpponent().getScriptSession());
		
		proxy.addFunctionCall("refreshoppo", player.getBoard(), player.getPreview());
	}
}
